package com.myschool.server.model;

import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name = "config")
public class Config extends BaseEntity {

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private List<Holiday> holidays;

	@Column(name = "image_path", length = 255)
	private String logoPath;

	@Column(length = 200)
	private String theme;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private List<GradeLevel> gradeLevels;

	@OneToOne(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	private School school;
	
	
    
	/**
	 * @return the school
	 */
	public School getSchool() {
		return school;
	}

	/**
	 * @param school the school to set
	 */
	public void setSchool(School school) {
		this.school = school;
	}

	/**
	 * @return the settings
	 */
	public List<Settings> getSettings() {
		return settings;
	}

	/**
	 * @param settings the settings to set
	 */
	public void setSettings(List<Settings> settings) {
		this.settings = settings;
	}

	@OneToMany(fetch=FetchType.LAZY,cascade=CascadeType.ALL)
	private List<Settings> settings;

	/**
	 * @return the holidays
	 */
	public List<Holiday> getHolidays() {
		return holidays;
	}

	/**
	 * @param holidays
	 *            the holidays to set
	 */
	public void setHolidays(List<Holiday> holidays) {
		this.holidays = holidays;
	}

	/**
	 * @return the logoPath
	 */
	public String getLogoPath() {
		return logoPath;
	}

	/**
	 * @param logoPath
	 *            the logoPath to set
	 */
	public void setLogoPath(String logoPath) {
		this.logoPath = logoPath;
	}

	/**
	 * @return the theme
	 */
	public String getTheme() {
		return theme;
	}

	/**
	 * @param theme
	 *            the theme to set
	 */
	public void setTheme(String theme) {
		this.theme = theme;
	}

	/**
	 * @return the gradeLevels
	 */
	public List<GradeLevel> getGradeLevels() {
		return gradeLevels;
	}

	/**
	 * @param gradeLevels
	 *            the gradeLevels to set
	 */
	public void setGradeLevels(List<GradeLevel> gradeLevels) {
		this.gradeLevels = gradeLevels;
	}
}
